﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SWDataDB.Models;
using SWDataDB.BLL;
using SWDataDB.DAL;
using System.Data;

public partial class Admin_add_addWJ : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }


    protected void submit_Click(object sender, EventArgs e)
    {
        XGDATA_TBL xg_info = new XGDATA_TBL();
        XGInfo kc_in = new XGInfo();

        xg_info.O_ZL_FILE_ID = Request.Form["ZL_FILE_ID"];
        xg_info.O_XG_CODE = Request.Form["XG_CODE"];
        xg_info.O_DATA_STYLE = Request.Form["DATA_STYLE"];


        xg_info.O_DATA_NAME = Request.Form["DATA_NAME"];
        xg_info.O_SCALE = Request.Form["SCALE"];
        xg_info.O_NUM = Request.Form["NUM"].Trim().Length == 0 ? 0 : int.Parse((Request.Form["NUM"]));



        if (kc_in.AddXGInfo(xg_info) == 1)
        {
            //bind();
            Response.Write("<script language=javascript>alert('添加成功！');location='../Manage/WJManage.aspx'</script>");
            //Response.Redirect("ZLManage.aspx");
        }
        else
        {
            Response.Write("<script language=javascript>alert('添加失败！');location='../Manage/WJManage.aspx'</script>");
        }
    }
}